﻿// Copyright (c) Microsoft Corporation.  All rights reserved.
//
// Module Name:
//
//  MockMAPIFolder.cs
//    
// Abstract:
//
//  Implements IMAPIFolder interface for unit testing
//  
//--

using System.Diagnostics.CodeAnalysis;
using Microsoft.Office.Interop.Outlook;
using System.Diagnostics;

namespace Microsoft.EnhancedReminders.OutlookAddIn.UnitTests
{
    /// <summary>
    /// Implements IMAPIFolder interface for unit testing
    /// </summary>
    public sealed class MockMAPIFolder : IMAPIFolder
    {
        private IMAPIFolder _rootFolder;
        private IStorageItem _storageItem;

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="rootFolder"></param>
        /// <param name="storageItem"></param>
        public MockMAPIFolder(IMAPIFolder rootFolder, IStorageItem storageItem)
        {
            _rootFolder = rootFolder;
            _storageItem = storageItem;
        }

        #region IMAPIFolder Members

        /// <summary>
        /// Implements IMAPIFolder.GetRootFolder
        /// </summary>
        /// <returns></returns>
        public IMAPIFolder GetRootFolder
        {
            get
            {
                return _rootFolder;
            }
        }

        /// <summary>
        /// Implements IMAPIFolder.GetStorage
        /// </summary>
        /// <param name="createIfMissing"></param>
        /// <returns></returns>
        public IStorageItem GetStorage(bool createIfMissing)
        {
            return _storageItem;
        }

        #endregion
    }
}
